All Questions
20 questions
0votes
0answers
533views
AngularJS unable to perform file upload [duplicate]
I am doing a file upload in angularjs. I am unable to get the file object content before sending to my back-end. XHR, headers: XHR-Header I have no idea why because I can get the content in my logs. ...
-1votes
1answer
230views
AngularJS Unable to display upload file logs [duplicate]
I am trying to create a file upload function using angularjs which will just accept the file and send it to the server side (Django). To ensure the file upload function is working fine, I've placed ...
0votes
2answers
811views
AngularJS file upload Error: $injector:unpr Unknown Provider
I am trying to do a file upload using angularjs. But I am getting this error for the past few days and I am unable to resolve: angular.js:13920 Error: [$injector:unpr] http://errors.angularjs.org/1....
1vote
1answer
1kviews
Can one inject a directive $compiler into a service?
I'm trying to output a directive as a javascript string so that I can place the html in a code display window. I'm interested in the actual code rather than the browser rendered version because I'm ...
1vote
1answer
450views
ngMap directive not displaying the location coordinates taken from service file
I am trying to call location coordinates from service file and display in google map view. But for some reason the data binding is not working, and there are no errors and the controller is calling ...
-1votes
2answers
45views
Error: [ng:areq] Argument 'ext-modules/fleet/jsFleetController.js' is not a function, got undefined
am getting "Error: [ng:areq] Argument 'ext-modules/fleet/jsFleetController.js' is not a function, got undefined" this error message when ever I load the template file. The following are the code, ...
0votes
2answers
170views
AngularJS: What's the correct syntax to share a factory service among custom directives with controllers?
I've 2 custom directives and a controller that all need to share some data. The following doesn't compile. What's the correct syntax to do this? flight-service.js (shared): (function() { var app = ...
0votes
1answer
2kviews
How to use variable from a Controller in a Directive link function?
I want to be able to use the variable "videoUrlId" from the controller 'useSpreadsheetData' below in my directive 'meetings'. How can I do this? I have looked at require but could not get it to work. ...
1vote
1answer
87views
AngularJS - use a service and controller in a directive
I am trying to use a service and controller in a directive. I have a button directive, on click of the button, i want to call a controller method() and call a service inside that method(). ...
0votes
1answer
559views
AngularJS - Not able to access service in a controller method
I am not able to access a service inside my controller method. AppController.$inject = ['$scope', 'appService']; function AppController($scope, appService) { $scope.name = "World"; $scope....
3votes
2answers
478views
Why does this AngularJs Service with variable object name return an undefined object?
Scenario: I'd like to use this service to share some properties inside my webApp. This service should have some object inside and the controllers should be able to get and set those objects. JS: ...
1vote
3answers
45views
Issue with $scopeProvider
I am having a js file like below. (function(){ angular.module("MyModule",[]) .service('testService',testService) .directive("testDirective",testDirective);; function testDirective(...
1vote
2answers
395views
Controllers and directives, precedence
I've been with Angularjs a few days and I'm struggling with a few aspects of it. I'll do my best to try and explain what the issue is, and I'd really appreciate any help anyone can give me about it. ...
0votes
1answer
256views
How to dynamically choose a repository/service to be used in a directive/controller?
I have a directive that gets data from the database but I want it to use different repositories (with the same API) in different places in the project. The incoming data has similar fields so that is ...
1vote
3answers
1kviews
How to access an object attribute inside a service in AngularJS?
I have a service with a local variable object with events names: myApp.service('appService', ['$rootScope', function ($rootScope) { var events = { firstEvent: "MyFirstEvent", ...